home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / music / miditalk.arc / MIDITALK.DOC < prev    next >
Text File  |  1985-11-20  |  12KB  |  314 lines

  1.  
  2.  
  3.  
  4.                              MIDITALK
  5.                     Copyright 1987 Rich Hickey
  6.      May be distributed freely but NOT sold, provided this 
  7. copyright notice remains intact.  All other rights reserved.
  8.  
  9.      Miditalk is an interactive utility that let's you 'converse'
  10. with your MIDI equipment from your Atari ST.  If you're just getting
  11. into MIDI it is a great way to see what's really travelling over the 
  12. MIDI lines. If you are a programmer working in a compiled language 
  13. like C or Pascal, you know how frustrating it can be to re-compile
  14. and link every time you try to get a new MIDI message to work. 
  15. Miditalk displays all incoming MIDI data on screen.  It also
  16. enables you to type in data and have it sent over the MIDI port.
  17. Miditalk also let's you create your own MIDI-macros and save and
  18. load data dumps.
  19.  
  20. MIDI Basics
  21.  
  22.      What actually goes on over MIDI ?  Well, the first concept
  23. to grasp is that no 'sound' travels via MIDI.  As with most computer
  24. interfaces, numeric data is the stuff of MIDI.  Musical instrument
  25. manufacturers got together and decided on a set of codes and a 
  26. protocol for their transmission.  The keeper of the code is the
  27. IMA (International MIDI Association), and for $35 they will send 
  28. you the detailed MIDI Specification.  If you plan on doing any 
  29. serious MIDI work I recommend it.  If you're just tinkering, or
  30. you can't wait for the spec to arrive - have no fear.  Miditalk
  31. does most of the work for you.
  32.  
  33.      (Note: All values in this program and article will be notated
  34. in hexadecimal unless otherwise indicated.  If you are unfamiliar 
  35. with hex consult any introductory level computer text for an 
  36. explanation.)
  37.  
  38.  
  39.      Let's look at a typical MIDI message.  If you press and 
  40. release middle C on your keyboard it will transmit something like
  41. this:
  42.  
  43.                90 3c 40    80 3c 00 
  44.  
  45.      How do we decipher this ?  The MIDI spec tells us that all 
  46. bytes in the range of 80 to ff (all of which have their leftmost 
  47. bit set to 1) are 'Status' bytes.  Status bytes can tell us anything 
  48. from 'A note was turned on' to 'The mod wheel was moved'.  These 
  49. status bytes are usually followed by one or more 'Data' bytes, which
  50. tell us what note was played and how hard, or how far the mod wheel 
  51. was spun.  Data bytes range from 00 to 7f. (Never greater).
  52.  
  53.      In the message above, 90 and 80 are status bytes.  90 is the 
  54. code for 'Note On', 80 for 'Note Off'.  Both commands are followed
  55. by two data bytes; the note number and the velocity (how hard the
  56. note was struck).  When you try this with Miditalk you'll see something
  57. like this:
  58.  
  59.                NON01 3c 40  NOF01 3c 00
  60.  
  61.  
  62.      You might get this:
  63.  
  64.                NON01 3c 40  NON01 3c 00
  65.  
  66.      But you only turned one note on ?!  Some synths turn off a note
  67. with a 'Note On' command with a velocity value of 00.  The beauty of
  68. Miditalk is being able to see how different synths implement the
  69. 'standard'.  Miditalk checks for incoming status bytes, translates 
  70. them into an abbreviation and displays them in reverse text.  Some
  71. status bytes (like 'Note On') have the MIDI channel number on which
  72. they were sent incorporated in them. MIDI has 16 channels so that
  73. many synths can communicate over the same line.  Each synth responds
  74. only to messages sent on it's channel.  The channel #, in decimal,
  75. will be displayed in reverse following the abbreviation as in the
  76. above case.  NON01 represents one byte, not two.  All data bytes
  77. are displayed in normal text.  Remember, all values are hex.
  78.  
  79.  
  80.  
  81. Using Miditalk
  82.  
  83.      When you first boot up Miditalk (medium or high rez recommended)
  84. you will be prompted for the capture buffer size.  This buffer will 
  85. be used to capture data dumps etc.  10K should be large enough for 
  86. most synth dumps.
  87.  
  88.      Next you will be asked to specify a library to load.  DEFAULT.LIB 
  89. contains macros for all of the status bytes.  If you hit return 
  90. without an entry the load will be cancelled and you will start with
  91. Miditalk's small, built-in library.
  92.  
  93.      Finally, you will be asked if you want to 'channelize' your data.
  94. If your synth is set to a MIDI channel other than one, you will want 
  95. to send data on that channel.  Indicate yes and specify a channel.
  96. If you choose not to channelize, your data will be sent on channel 1.
  97.  
  98.      O.K. - play some notes, move the pitch bend, change patches 
  99. and watch the show !
  100.  
  101.  
  102.  
  103.      The program is Miditalk, not Midilisten, and the ability to 
  104. transmit is what it's all about.  To go into the Talk/Command mode
  105. just hit the spacebar.  You can now type in your command/message.
  106. The parser expects the following format:
  107.  
  108.  
  109.      Status and data bytes are two digit hex values using lower
  110.      case letters.  (b0 21 7a etc.)
  111.  
  112.      Each byte is separated by a space.
  113.  
  114.      Macros are all Upper case letters.  Macros are separated from 
  115.      one other by a space.
  116.  
  117.      Macros and hex values can be combined on a Talk line.  for 
  118. example, to turn on middle C:
  119.  
  120.      Go into Talk/Command mode (space bar)
  121.  
  122.      Type       NON 3c 50      Hit return.
  123.  
  124.   
  125. NOF 3c 00  will turn it off.  After each command/message you are
  126. returned to the monitor mode to see what response, if any , there 
  127. was from the synth.  Note that NON and NOF are not followed by 
  128. the MIDI channel.  This is automatically handled by the channelization
  129. feature.  You are probably wondering what macros are available
  130. and what they represent.  Go into the Talk/Command mode and type:
  131.  
  132.      SHOWLIB   (return)
  133.  
  134.      This will display the contents of the currently loaded library.
  135.  
  136.      SHOWLIB is a command.  Commands are built into the program, 
  137. not the library.  They are always available.  Like macros, they are
  138. all caps and must be separated by a space.  Most do not cause anything 
  139. to be sent over the MIDI line.  The available commands are:
  140.  
  141.  
  142.      CHAN    - to change MIDI channels or channelization status.
  143.  
  144.      SHOWLIB - displays library.
  145.  
  146.      SAVELIB - saves library to disk
  147.  
  148.      LOADLIB - loads library from disk
  149.  
  150.      SENSING - toggles active sensing filter
  151.  
  152.      BUFON   - turns on capture buffer
  153.  
  154.      BUFOF   - turns off capture buffer
  155.  
  156.      BUFRST  - resets capture buffer for new data
  157.  
  158.      SAVEBUF - saves capture buffer to disk
  159.  
  160.      LOADBUF - loads capture buffer from disk
  161.  
  162.      TRANSMIT  sends capture buffer data over MIDI port
  163.  
  164.      RPT     - repeats previous Talk/Command line
  165.  
  166.      CLR     - clears MIDI input backlog
  167.  
  168.      MACRO   - create or redefine a macro
  169.  
  170.      Note that commands are executed as they are encountered by
  171. the parser while outgoing data is not sent until the entire line
  172. is parsed.  Therefore they will be executed before any data is 
  173. sent, even if they are in the middle of the line.
  174.   
  175.  
  176. Macros
  177.  
  178.      As you can see from looking at the library, macros can stand 
  179. for one byte or a whole string.  Macros can also contain other 
  180. macros.  By 'nesting' macros you can create very powerful, easy to 
  181. use tools.  To create a macro use the MACRO command.  You'll be 
  182. prompted for a name.  If you enter a name that already exists you 
  183. will have an opportunity to redefine it.  Next, simply enter the 
  184. macro in the same format as any Talk line.  Voila! Your macro is 
  185. now in the library (try SHOWLIB).  Remember to save the library if 
  186. you've added something worthwhile to it.  You can create custom 
  187. libraries for each synth if you like.  Each library can contain up 
  188. to 100 macros.  Theoretically, macros may contain commands, but 
  189. any commands will be carried out while you are defining the macro. 
  190. This is due to the macro validation process.  If you can deal with 
  191. this, fine, otherwise keep commands out of macros.
  192.  
  193. The Capture Buffer
  194.  
  195.      At some point in your experimentation you will probably meet 
  196. up with 'System Exclusive'.  Most synths and drum machines have 
  197. some way of 'dumping' their patch data or sequencer data via MIDI.
  198. Unfortunately, there is no standard way to do this.The MIDI spec 
  199. provides the System Exclusive status byte, after which each 
  200. manufacturer can utilize their own system for dumps o